package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "set_unit")
public class SetUnit implements Serializable {
    private Long id;
    private String setUuid;
    private String userUuid;
    private String userPhone;
    private String userName;
    private Integer setStatus;
    private Long setTime;
    private String setIp;
    private Long upTime;
    private Long belowTime;
    private String setBound;
    private String longitude;
    private String latitude;
    private String versions;
    private Integer number;
    private Long battery;
    private String setRemove;
    private String appProvince;
    private String appCity;
    private String appCountry;
    private String appTown;
    private String appAddress;
    private Integer warning;
    private String trusteeship; //是否托管
    private Integer repair;
    private String appAddressAll;
    private Integer energy; //当前设定温度
    private String pactNumber;
    private String opeUser;
    private String opeUuid;
    private String setVolName;
    private String setVolUuid;
    private String setAlias;
    private String setSim; //设备sim卡卡号
    private Long setBindTime; //绑定时间

    @Basic
    @Column(name = "set_bind_time")
    public Long getSetBindTime() {
        return setBindTime;
    }

    public void setSetBindTime(Long setBindTime) {
        this.setBindTime = setBindTime;
    }

    @Basic
    @Column(name = "set_sim")
    public String getSetSim() {
        return setSim;
    }

    public void setSetSim(String setSim) {
        this.setSim = setSim;
    }

    @Basic
    @Column(name = "set_alias")
    public String getSetAlias() {
        return setAlias;
    }

    public void setSetAlias(String setAlias) {
        this.setAlias = setAlias;
    }

    @Basic
    @Column(name = "set_vol_name")
    public String getSetVolName() {
        return setVolName;
    }

    public void setSetVolName(String setVolName) {
        this.setVolName = setVolName;
    }

    @Basic
    @Column(name = "set_vol_uuid")
    public String getSetVolUuid() {
        return setVolUuid;
    }

    public void setSetVolUuid(String setVolUuid) {
        this.setVolUuid = setVolUuid;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "set_uuid")
    public String getSetUuid() {
        return setUuid;
    }

    public void setSetUuid(String setUuid) {
        this.setUuid = setUuid;
    }

    @Basic
    @Column(name = "user_uuid")
    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    @Basic
    @Column(name = "user_phone")
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "set_status")
    public Integer getSetStatus() {
        return setStatus;
    }

    public void setSetStatus(Integer setStatus) {
        this.setStatus = setStatus;
    }

    @Basic
    @Column(name = "set_time")
    public Long getSetTime() {
        return setTime;
    }

    public void setSetTime(Long setTime) {
        this.setTime = setTime;
    }

    @Basic
    @Column(name = "set_ip")
    public String getSetIp() {
        return setIp;
    }

    public void setSetIp(String setIp) {
        this.setIp = setIp;
    }

    @Basic
    @Column(name = "up_time")
    public Long getUpTime() {
        return upTime;
    }

    public void setUpTime(Long upTime) {
        this.upTime = upTime;
    }

    @Basic
    @Column(name = "below_time")
    public Long getBelowTime() {
        return belowTime;
    }

    public void setBelowTime(Long belowTime) {
        this.belowTime = belowTime;
    }

    @Basic
    @Column(name = "set_bound")
    public String getSetBound() {
        return setBound;
    }

    public void setSetBound(String setBound) {
        this.setBound = setBound;
    }

    @Basic
    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    @Basic
    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Basic
    @Column(name = "versions")
    public String getVersions() {
        return versions;
    }

    public void setVersions(String versions) {
        this.versions = versions;
    }

    @Basic
    @Column(name = "number")
    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Basic
    @Column(name = "battery")
    public Long getBattery() {
        return battery;
    }

    public void setBattery(Long battery) {
        this.battery = battery;
    }

    @Basic
    @Column(name = "set_remove")
    public String getSetRemove() {
        return setRemove;
    }

    public void setSetRemove(String setRemove) {
        this.setRemove = setRemove;
    }

    @Basic
    @Column(name = "app_province")
    public String getAppProvince() {
        return appProvince;
    }

    public void setAppProvince(String appProvince) {
        this.appProvince = appProvince;
    }

    @Basic
    @Column(name = "app_city")
    public String getAppCity() {
        return appCity;
    }

    public void setAppCity(String appCity) {
        this.appCity = appCity;
    }

    @Basic
    @Column(name = "app_country")
    public String getAppCountry() {
        return appCountry;
    }

    public void setAppCountry(String appCountry) {
        this.appCountry = appCountry;
    }

    @Basic
    @Column(name = "app_town")
    public String getAppTown() {
        return appTown;
    }

    public void setAppTown(String appTown) {
        this.appTown = appTown;
    }

    @Basic
    @Column(name = "app_address")
    public String getAppAddress() {
        return appAddress;
    }

    public void setAppAddress(String appAddress) {
        this.appAddress = appAddress;
    }

    @Basic
    @Column(name = "warning")
    public Integer getWarning() {
        return warning;
    }

    public void setWarning(Integer warning) {
        this.warning = warning;
    }

    @Basic
    @Column(name = "trusteeship")
    public String getTrusteeship() {
        return trusteeship;
    }

    public void setTrusteeship(String trusteeship) {
        this.trusteeship = trusteeship;
    }

    @Basic
    @Column(name = "repair")
    public Integer getRepair() {
        return repair;
    }

    public void setRepair(Integer repair) {
        this.repair = repair;
    }

    @Basic
    @Column(name = "app_address_all")
    public String getAppAddressAll() {
        return appAddressAll;
    }

    public void setAppAddressAll(String appAddressAll) {
        this.appAddressAll = appAddressAll;
    }

    @Basic
    @Column(name = "energy")
    public Integer getEnergy() {
        return energy;
    }

    public void setEnergy(Integer energy) {
        this.energy = energy;
    }

    @Basic
    @Column(name = "pact_number")
    public String getPactNumber() {
        return pactNumber;
    }

    public void setPactNumber(String pactNumber) {
        this.pactNumber = pactNumber;
    }

    @Basic
    @Column(name = "ope_user")
    public String getOpeUser() {
        return opeUser;
    }

    public void setOpeUser(String opeUser) {
        this.opeUser = opeUser;
    }

    @Basic
    @Column(name = "ope_uuid")
    public String getOpeUuid() {
        return opeUuid;
    }

    public void setOpeUuid(String opeUuid) {
        this.opeUuid = opeUuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SetUnit setUnit = (SetUnit) o;
        return Objects.equals(id, setUnit.id) &&
                Objects.equals(setUuid, setUnit.setUuid) &&
                Objects.equals(userUuid, setUnit.userUuid) &&
                Objects.equals(userPhone, setUnit.userPhone) &&
                Objects.equals(userName, setUnit.userName) &&
                Objects.equals(setStatus, setUnit.setStatus) &&
                Objects.equals(setTime, setUnit.setTime) &&
                Objects.equals(setIp, setUnit.setIp) &&
                Objects.equals(upTime, setUnit.upTime) &&
                Objects.equals(belowTime, setUnit.belowTime) &&
                Objects.equals(setBound, setUnit.setBound) &&
                Objects.equals(longitude, setUnit.longitude) &&
                Objects.equals(latitude, setUnit.latitude) &&
                Objects.equals(versions, setUnit.versions) &&
                Objects.equals(number, setUnit.number) &&
                Objects.equals(battery, setUnit.battery) &&
                Objects.equals(setRemove, setUnit.setRemove) &&
                Objects.equals(appProvince, setUnit.appProvince) &&
                Objects.equals(appCity, setUnit.appCity) &&
                Objects.equals(appCountry, setUnit.appCountry) &&
                Objects.equals(appTown, setUnit.appTown) &&
                Objects.equals(appAddress, setUnit.appAddress) &&
                Objects.equals(warning, setUnit.warning) &&
                Objects.equals(trusteeship, setUnit.trusteeship) &&
                Objects.equals(repair, setUnit.repair) &&
                Objects.equals(appAddressAll, setUnit.appAddressAll) &&
                Objects.equals(energy, setUnit.energy) &&
                Objects.equals(pactNumber, setUnit.pactNumber) &&
                Objects.equals(opeUser, setUnit.opeUser) &&
                Objects.equals(opeUuid, setUnit.opeUuid);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, setUuid, userUuid, userPhone, userName, setStatus, setTime, setIp, upTime, belowTime, setBound, longitude, latitude, versions, number, battery, setRemove, appProvince, appCity, appCountry, appTown, appAddress, warning, trusteeship, repair, appAddressAll, energy, pactNumber, opeUser, opeUuid);
    }
}
